package tdd;

/**
 * @Author: tong wu
 * @Description:
 * @Version: 1.0
 **/
public class BackstagePass extends Goods {
    public BackstagePass(double quality, int sellIn) {
        super("BackstagePass", quality, sellIn);
    }

    @Override
    void updateStock() {
        increaseQuality();
        if (sellIn < 11) {
            increaseQuality();
        }
        if (sellIn < 6) {
            increaseQuality();
        }
        decreaseSellIn();
        if (isExpired()) {
            quality = 0;
        }
    }
}
